home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / global-one-water.swf / scripts / __Packages / KidExclamation.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  823 b   |  37 lines

  1. class KidExclamation extends GameObject
  2. {
  3.    var inner;
  4.    var engine;
  5.    var from;
  6.    function KidExclamation()
  7.    {
  8.       super();
  9.       this.inner.stop();
  10.       this._visible = false;
  11.    }
  12.    function init(e)
  13.    {
  14.       this.engine = e;
  15.       this.from = this.engine.exclamationScaleTarget;
  16.       this.n = this.engine.indQueue.shift();
  17.    }
  18.    function setState(s)
  19.    {
  20.       switch(s)
  21.       {
  22.          case KidMc.OK:
  23.             this._visible = false;
  24.             this.stop();
  25.             break;
  26.          case KidMc.TIRED:
  27.             this._visible = true;
  28.             this.inner.gotoAndStop(KidMc.TIRED);
  29.             this.play();
  30.             break;
  31.          case KidMc.KNACKERED:
  32.             this._visible = true;
  33.             this.inner.gotoAndStop(KidMc.KNACKERED);
  34.       }
  35.    }
  36. }
  37.